﻿' ----------------------------------------------------------------------
'
' NewDirectoryItem.vb
'
'   Dbfs
'
'   This class contains the implementation o...
'
' ----------------------------------------------------------------------
' version:  1.0.0.1
' today:    02/09/09  11:26:00
' ident:    "@(#)/Dbfs/Entities/NewDirectoryItem.vb 1.0 0.1 02/09/09 0 rjs"

Imports System.IO
Imports Dbfs.Security


Namespace Dbfs

    <SerializableAttribute()> _
    Public Class NewDirectoryItem
        Inherits FileSystemItem

        ''' <summary>
        ''' Initializes a new instance of the <see cref="FileSystemItem"/> class.
        ''' </summary>
        ''' <remarks></remarks>
        Public Sub New()
            MyBase.New()

            ' local variables
            Dim utcNow As Date = DateTime.UtcNow

            ' System.IO.FileSystemInfo class variables
            'Attributes = FileAttributes.Directory + FileAttributes.Archive
            CreationTimeUtc = utcNow
            LastAccessTimeUtc = utcNow
            LastWriteTimeUtc = utcNow

            ' DBFS extension variables
            EffectiveDateUtc = utcNow
            TrackChanges = False

            ' set security
            Dim tempDs As DbfsDirectorySecurity = New DbfsDirectorySecurity()
            FileSystemSecurity = tempDs

            Exists = False

        End Sub

        ''' <summary>
        ''' Initializes a new instance of the <see cref="FileSystemItem"/> class on the specified path.
        ''' </summary>
        ''' <param name="path">A string specifying the name of the <see cref="FileSystemItem"/>.</param>
        ''' <remarks></remarks>
        Public Sub New(ByVal path As String)
            Me.New()
            ' System.IO.FileSystemInfo class variables
            Me.Name.Value = System.IO.Path.GetFileName(path)
        End Sub

    End Class

End Namespace